package placemodel

import "yundian/internel/pkg/dingo"

type PlacesAttr func(model *PlaceModel)

type PlacesAttrs []PlacesAttr

func (attrFunc PlacesAttrs) Alppy(model *PlaceModel) {
	for _, f := range attrFunc {
		f(model)
	}
}

func WithID(id int) PlacesAttr {
	return func(model *PlaceModel) { model.Id = id }
}

func WithPlaceName(placeName string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceName = placeName }
}

func WithClassName(className string) PlacesAttr {
	return func(model *PlaceModel) { model.ClassName = className }
}

func WithUserID(userID int) PlacesAttr {
	return func(model *PlaceModel) { model.UserID = userID }
}

func WithUserName(userName string) PlacesAttr {
	return func(model *PlaceModel) { model.UserName = userName }
}

func WithLevel(level string) PlacesAttr {
	return func(model *PlaceModel) { model.Level = level }
}

func WithPlaceImg(placeImg string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceImg = placeImg }
}

func WithLongitude(longitude string) PlacesAttr {
	return func(model *PlaceModel) { model.Longitude = longitude }
}

func WithLatitude(latitude string) PlacesAttr {
	return func(model *PlaceModel) { model.Latitude = latitude }
}

func WithPlaceDesc(placeDesc string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceDesc = placeDesc }
}

func WithStatus(status int8) PlacesAttr {
	return func(model *PlaceModel) { model.Status = status }
}

func WithCreateAt(createAt dingo.Time) PlacesAttr {
	return func(model *PlaceModel) { model.CreateAt = createAt }
}

func WithUpdateAt(updateAt dingo.Time) PlacesAttr {
	return func(model *PlaceModel) { model.UpdateAt = updateAt }
}

func WithMaintainerId(maintainerId int) PlacesAttr {
	return func(model *PlaceModel) { model.MaintainerId = maintainerId }
}

func WithProvince(province string) PlacesAttr {
	return func(model *PlaceModel) { model.Province = province }
}

func WithCity(city string) PlacesAttr {
	return func(model *PlaceModel) { model.City = city }
}
func WithCounty(county string) PlacesAttr {
	return func(model *PlaceModel) { model.County = county }
}

func WithCountry(country string) PlacesAttr {
	return func(model *PlaceModel) { model.Country = country }
}

func WithRegionCode(regionCode string) PlacesAttr {
	return func(model *PlaceModel) { model.RegionCode = regionCode }
}

func WithRegionIds(regionIds string) PlacesAttr {
	return func(model *PlaceModel) { model.RegionIds = regionIds }
}

func WithAddress(address string) PlacesAttr {
	return func(model *PlaceModel) { model.Address = address }
}

func WithKaUserId(kaUserId int) PlacesAttr {
	return func(model *PlaceModel) { model.KaUserId = kaUserId }
}

func WithAgentUserId(agentUserId int) PlacesAttr {
	return func(model *PlaceModel) { model.AgentUserId = agentUserId }
}

func WithBranchUserId(branchUserId int) PlacesAttr {
	return func(model *PlaceModel) { model.BranchUserId = branchUserId }
}

func WithAgentUserName(agentUserName string) PlacesAttr {
	return func(model *PlaceModel) { model.AgentUserName = agentUserName }
}

func WithEntryMoney(entryMoney int) PlacesAttr {
	return func(model *PlaceModel) { model.EntryMoney = entryMoney }
}

func WithEntryAt(entryAt dingo.Time) PlacesAttr {
	return func(model *PlaceModel) { model.EntryAt = entryAt }
}

func WithEntryStatus(entryStatus int8) PlacesAttr {
	return func(model *PlaceModel) { model.EntryStatus = entryStatus }
}

func WithHotelId(hotelId string) PlacesAttr {
	return func(model *PlaceModel) { model.HotelId = hotelId }
}

func WithProvinceId(ProvinceId int) PlacesAttr {
	return func(model *PlaceModel) { model.ProvinceId = ProvinceId }
}

func WithCityId(CityId int) PlacesAttr {
	return func(model *PlaceModel) { model.CityId = CityId }
}

func WithCountyId(CountyId int) PlacesAttr {
	return func(model *PlaceModel) { model.CountyId = CountyId }
}

func WithAreaId(AreaId int) PlacesAttr {
	return func(model *PlaceModel) { model.AreaId = AreaId }
}

func WithIsAd(IsAd int) PlacesAttr {
	return func(model *PlaceModel) { model.IsAd = IsAd }
}

func WithIsBusiness(isBusiness int) PlacesAttr {
	return func(model *PlaceModel) { model.IsBusiness = isBusiness }
}

func WithIsOpenFirst(isOpenFirst int) PlacesAttr {
	return func(model *PlaceModel) { model.IsOpenFirst = isOpenFirst }
}

func WithProjectLabel(projectLabel string) PlacesAttr {
	return func(model *PlaceModel) { model.ProjectLabel = projectLabel }
}

func WithDrawStr(drawStr string) PlacesAttr {
	return func(model *PlaceModel) { model.DrawStr = drawStr }
}

func WithPlaceLicense(PlaceLicense string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceLicense = PlaceLicense }
}
func WithPlaceFace(PlaceFace string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceFace = PlaceFace }
}
func WithPlaceDesign(PlaceDesign string) PlacesAttr {
	return func(model *PlaceModel) { model.PlaceDesign = PlaceDesign }
}

func WithMscId(mscId int) PlacesAttr {
	return func(model *PlaceModel) { model.MscID = mscId }
}
